using UnityEngine;
using UnityEngine.InputSystem;

public class PlayerInputs : MonoBehaviour {
    public Vector2 move { get; private set; }

    public Vector2 look { get; private set; }

    public bool rolling { get; private set; } = false;

    public bool sprinting { get; private set; } = false;

    public bool jumping { get; private set; } = false;

    public void OnMovement(InputValue value) {
        move = value.Get<Vector2>();
    }

    public void OnLook(InputValue value) {
        look = value.Get<Vector2>();
    }

    public void OnRoll(InputValue value) {
        rolling = value.isPressed;
    }

    public void OnSprint(InputValue value) {
        sprinting = value.isPressed;
    }

    public void OnJump(InputValue value) {
        jumping = value.isPressed;
    }

    internal void ResetStatus() {
        rolling = false;
        jumping = false;
    }
}
